﻿@model PMSMVC.Models.DocTaskEditModel

@{
    ViewBag.Title = "Edit";
}

<h2>Edit</h2>

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/My97DatePicker/WdatePicker.js")" type="text/javascript"></script>

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)
    <fieldset>
        <legend>DocTaskEditModel</legend>

        @Html.HiddenFor(model => model.DocTask.TaskID)
        @Html.HiddenFor(model => model.DocTask.ProjectID)
        @Html.HiddenFor(model => model.DocTask.TaskStatus)

        @*<div class="editor-label">
            @Html.LabelFor(model => model.DocTask.TaskID)
        </div>
        <div class="editor-field">
            @Html.DisplayFor(model => model.DocTask.TaskID)
        </div>*@

        <div class="editor-label">
            @Html.LabelFor(model => model.DocTask.ProjectID)
        </div>
        <div class="editor-field">
            @Html.DisplayFor(model => model.DocTask.ProjectID)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.DocTask.TaskName)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.DocTask.TaskName)
            @Html.ValidationMessageFor(model => model.DocTask.TaskName)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.DocTask.RecordTime)
        </div>
        <div class="editor-field">
            @Html.TextBoxFor(model => model.DocTask.RecordTime, new { @onclick = "WdatePicker({dateFmt:'yyyy-MM-dd'})" })
            @Html.ValidationMessageFor(model => model.DocTask.RecordTime)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.DocTask.Publisher)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.DocTask.Publisher)
            @Html.ValidationMessageFor(model => model.DocTask.Publisher)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.DocTask.BeginTime)
        </div>
        <div class="editor-field">
            @Html.TextBoxFor(model => model.DocTask.BeginTime, new { @onclick = "WdatePicker({dateFmt:'yyyy-MM-dd'})" })
            @Html.ValidationMessageFor(model => model.DocTask.BeginTime)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.DocTask.PostTime)
        </div>
        <div class="editor-field">
            @Html.TextBoxFor(model => model.DocTask.PostTime, new { @onclick = "WdatePicker({dateFmt:'yyyy-MM-dd'})" })
            @Html.ValidationMessageFor(model => model.DocTask.PostTime)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.DocTask.Executor)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.DocTask.Executor)
            @Html.ValidationMessageFor(model => model.DocTask.Executor)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.DocTask.Checker)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.DocTask.Checker)
            @Html.ValidationMessageFor(model => model.DocTask.Checker)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.DocTask.TaskDetail)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.DocTask.TaskDetail)
            @Html.ValidationMessageFor(model => model.DocTask.TaskDetail)
        </div>

        @*<div class="editor-label">
            @Html.LabelFor(model => model.DocTask.TaskStatus)
        </div>
        <div class="editor-field">
            @Html.DisplayFor(model => model.DocTask.TaskStatus)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.RecordTime)
        </div>
        <div class="editor-field">
            @Html.TextBoxFor(model => model.RecordTime, new { @onclick = "WdatePicker({dateFmt:'yyyy-MM-dd'})" })
            @Html.ValidationMessageFor(model => model.RecordTime)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.UserID)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.UserID)
            @Html.ValidationMessageFor(model => model.UserID)
        </div>*@

        <div class="editor-label">
            @Html.LabelFor(model => model.ChangeDetail)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.ChangeDetail)
            @Html.ValidationMessageFor(model => model.ChangeDetail)
        </div>

        <p>
            <input type="submit" value="Save" />
        </p>
    </fieldset>
}

<div>
    @Html.ActionLink("Back to List", "Index", new { projectID = Model.DocTask.ProjectID })
</div>
